﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(WebFabricator.org.Startup))]

//http://msdn.microsoft.com/en-us/magazine/dn451439.aspx
//https://www.simple-talk.com/dotnet/.net-framework/owin-customizing-the-web-server/
namespace WebFabricator.org
{
    public class Startup
    {
       
        public void Configuration(IAppBuilder app)
        {   
            app.UseWebFabrication();

            #region comment
            //app.Use<LoggerMiddleware>();
            //app.Map("/test", (testApp) =>
            //{
            //    testApp.Run(async context =>
            //    {
            //        context.Response.ContentType = "text/plain";
            //        await context.Response.WriteAsync("test");
            //    });

            //});
            //app.Run(context =>
            //{
            //    var f = new WebFabricator.org.Fabricator<IOwinContext>();
            //    f.Fabricate(context);

            //    context.Response.ContentType = "text/plain";
            //    return context.Response.WriteAsync(context.Request.Uri.ToString());
            //});
            #endregion
        }
    } 
}